{extend name="public/base"}
{block name="title"}视频播放{/block}

{block name="css"}
<link rel="stylesheet" href="__JS__/lib/video/dplayer/DPlayer.min.css" type="" media=""/>
{/block}

{block name="main"}
<div class="main-wrapper">
    {include file="index/nav"}
    <div class="file-wrapper">
        <div class="video-info-wrapper">
            <div id="dplayer"></div>
            <input type="hidden" name="http-url" value="{$host_name}/disk/{$path}">
        </div>
    </div>
</div>
{/block}

{block name="js"}
<script src="__JS__/lib/video/hls.min.js"></script>
<script src = "__JS__/lib/video/dplayer/DPlayer.min.js"></script>
<script type="text/javascript">
    var http_url = document.getElementsByName('http-url')[0];

    const dp = new DPlayer({
        container: document.getElementById('dplayer'),
        video: {
            url: http_url.value,
        }
    });
</script>
{/block}
